import request from '@/utils/request'
// 获取权限点列表
export function getPermission() {
  return request.get('api/sys/permission')
}

// 添加权限点
export function addPermission(data) {
  return request.post('api/sys/permission', data)
}

// 删除权限点
export function delPermission(id) {
  return request.delete(`api/sys/permission/${id}`)
}

// 确认编辑
export function editPermission(data) {
  return request.put(`api/sys/permission/${data.id}`, data)
}

// 根据id获取权限点详情
export function getPermissionById(id) {
  return request.get(`api/sys/permission/${id}`)
}

// 添加角色权限点
export function addRolesPermission(data) {
  return request.put('api/sys/user/assignRoles', data)
}
